<template>
    <div class="app-container">
        <!-- 预约单信息 -->
        <h5 class="titleInfo">
            预约单信息
        </h5>
        <el-form ref="list" :inline="true" :model="list" label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="预约单号">
                        <span class="spanToInput">{{list.orderSn | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预约状态">
                        <span class="spanToInput">{{list.orderStatus | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预约医院">
                        <span class="spanToInput">{{list.hospitalName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预约项目">
                        <span class="spanToInput">{{list.projectName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预约日期">
                        <span class="spanToInput">{{list.orderDate | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 客户信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            客户信息
        </h5>
        <el-form ref="list" :inline="true" :model="list" label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="客户手机号">
                        <span class="spanToInput">{{list.userPhone | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="客户姓名">
                        <span class="spanToInput">{{list.userName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="客户年龄">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="客户性别">
                        <el-select placeholder="请选择" v-model="val">
                            <el-option label="1" value="1"></el-option>
                            <el-option label="2" value="2"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="职业">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="推荐人姓名">
                        <span class="spanToInput">{{list.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="推荐人手机号">
                        <span class="spanToInput">{{list.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 其他信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            其他信息
        </h5>
        <el-form ref="list" :inline="true" :model="list" label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="性格特点">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="用户关注">
                        <el-select placeholder="请选择" v-model="val">
                            <el-option label="1" value="1"></el-option>
                            <el-option label="2" value="2"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="曾咨询医院">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="曾做过项目">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="经济自主权">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="经济实力">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预期消费">
                        <el-select placeholder="请选择" v-model="val">
                            <el-option label="1" value="1"></el-option>
                            <el-option label="2" value="2"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="铺垫项目">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="铺垫程度">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="备注">
                        <el-input></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>
<script>
    import { findProjectOrderProjectByOrderSn } from '@/api/subscribeManage' 
    export default {
        name:"subManageEdit",
        data(){
            return {
                val:"1",
                userId:"",
                list:{}
            }
        },
        filters:{
            filterNull(e) {
                if(!e){
                    return "暂无"
                }else{
                    return e
                }
            },
            cardNull(e){
                return window.helper.cardType(e)
            },
            userFocus(e){
                return window.helper.userFocus(e)
            }
        },
        mounted(){
            this.userId = Number(this.$route.query.userId)
            this.getList()
        },
        methods:{
            getList(){
                let datas = {id:String(this.userId)}
                findProjectOrderProjectByOrderSn(datas).then().then(res =>{
                    console.log(res)
                    if(!res.data.code){
                        this.list = res.data.data
                    }else{
                        this.$message.error("数据接口访问失败");
                    }
                })
                .catch(error =>{
                    this.$message.error(error);
                })
            }
        }
    }
</script>

<style scoped>
    .app-container{padding: 0px!important}
    .form{margin-left: 268px}
</style>